<!--#begin slist -->
<script type="text/javascript">

function load_edit_form(a)
{
	if (typeof document.forms['sedit'].elements == 'undefined')
		return;

	var el = document.forms['sedit'].elements;

	

	el['sid'].value			 = parseInt(a.href.substring(a.href.indexOf('sid=')+4));
	el['name'].value		 = a.innerHTML;
	el['deleteg'].style.visibility = 'visible';
	document.getElementById('setofgroupcreate_formtitle').innerHTML = '{ t_edit_set }';

	return false;
}


function load_clear()
{
	if (typeof document.forms['sedit'].elements == 'undefined')
		return;

	var el = document.forms['sedit'].elements;

	el['sid'].value			 = '';
	el['name'].value		 = '';
	el['deleteg'].style.visibility = 'hidden';
	document.getElementById('setofgroupcreate_formtitle').innerHTML = '{ t_create_set }';
	
	// document.location.href='#bab_list_end';
	return false;
}

</script>
<table width="70%" border="0" cellspacing="0" cellpadding="2" align="center">
<tr> 
	<td class="BabLoginCadreBackground" align="center" valign="middle"> 
		<table width="100%" border="0" cellspacing="0" cellpadding="4" align="center">
		<tr class="BabSiteAdminTitleFontBackground"> 
			<td>{ t_name } </td>
			<td width="10%">{ t_groups }</td>
			<td width="5%" align="center">{ t_add_group }</td>
		</tr>
		<!--#in getnext --> 
		<!--#if altbg --><tr class="BabSiteAdminFontBackground"><!--#else altbg --><tr class="BabForumBackground1"><!--#endif altbg -->
			<td><a href="{ babUrlScript }?tg=setsofgroups&amp;idx=sedit&amp;sid={ arr[id] }" onclick="return load_edit_form(this);">{ arr[name] }</a></td>
			<td><a href="{ babUrlScript }?tg=setsofgroups&amp;idx=glist&amp;sid={ arr[id] }">{ arr[nb_groups] } { t_group }</a></td>
			<td align="center"><a href="{ babUrlScript }?tg=setsofgroups&amp;idx=add&amp;sid={ arr[id] }"><img src="{ babSkinPath }images/Puces/insertInto.gif" alt="{ t_modify }" border="0" /></a></td>
			</tr>
			<!--#endin getnext -->

		<tr class="BabSiteAdminTitleFontBackground"> 
			<td colspan="3"><a href="{ babUrlScript }?tg=setsofgroups&amp;idx=sedit" onclick="return load_clear();">{ t_new }</a></td>
		</tr>
		</table>
	</td>
</tr>
</table>
<a name="bab_list_end"></a>
<br />
<!--#end slist -->


<!--#begin sedit -->
<form name="sedit" method="post" action="{ babPhpSelf }">
<input type="hidden" name="tg" value="setsofgroups" />
<input type="hidden" name="idx" value="list" />
<input type="hidden" name="action" value="sedit" />
<input type="hidden" name="sid" value="{ arr[id] }" />
<table  width="70%" border="0" cellspacing="0" cellpadding="2" align="center">
<tr> 
<td class="BabLoginCadreBackground" align="center" valign="middle"> 
	<table class="BabLoginMenuBackground"  width="100%" border="0" cellspacing="0" cellpadding="8" align="center">
	<tr>
		<td id="setofgroupcreate_formtitle">{ t_create_set }</td>
	</tr>
	
	<tr> 
		<td align="center">{ t_name } : 
		<input type="text" name="name" size="30" maxlength="128" value="{ arr[name] }" /> &nbsp; 
		<input type="submit" name="submit" value="{ t_record }" />
		
		&nbsp;&nbsp;<input type="submit" name="deleteg" <!--#if bdel --> <!--#else bdel --> style="visibility:hidden"<!--#endif bdel --> value="{ t_delete }" onclick="return confirm('{ t_delconf }')" />

		</td>
	</tr>
	</table>
</td>
</tr>
</table>
</form>
<!--#end sedit -->


<!--#begin glist -->
<script type="text/javascript">
<!--
function submitCtrl(form)
{
	//}
	var message = '{ confirmdelete }';
	var checkboxes = form.getElementsByTagName('INPUT');
	var nbCheckboxes = checkboxes.length;
	for (var i = 0; i < nbCheckboxes; i++) {
		var checkbox = checkboxes[i];
		if (checkbox.type == 'checkbox' && checkbox.checked) {
			return confirm(message);
		}
	}
	return true;
}
//-->
</script>
<form method="post" action="{ babPhpSelf }" name="listform" onSubmit="return submitCtrl(this);">
<input type="hidden" name="tg" value="setsofgroups" />
<input type="hidden" name="idx" value="glist" />
<input type="hidden" name="action" value="glist" />
<input type="hidden" name="sid" value="{ sid }" />
<table width="95%" border="0" cellspacing="0" cellpadding="2" align="center">
<tr> 
	<td class="BabLoginCadreBackground" align="center" valign="middle"> 
		<table width="100%" border="0" cellspacing="0" cellpadding="3" align="center">
		<tr class="BabSiteAdminTitleFontBackground"> 
			<td>{ t_name } </td>
			<td width="1%">{ t_del }</td>
		</tr>
		<!--#in getnext --> 
		<!--#if altbg --><tr class="BabSiteAdminFontBackground"><!--#else altbg --><tr class="BabForumBackground1"><!--#endif altbg -->
			<td>{ arr[name] }</td>
			
			<td valign="middle" width="0%" align="center"> 
				<input type="checkbox" name="groups[]" value="{ arr[id] }" />
			</td>
			</tr>
			<!--#endin getnext -->
			<tr class="BabSiteAdminTitleFontBackground"> 
			<td><a href="{ babUrlScript }?tg=setsofgroups&amp;idx=add&amp;sid={ sid }">{ t_add_groups }</a></td>
			<td align="center"><a href="javascript:onCheckAll('groups', true)"><img src="{ babSkinPath }images/Puces/Pucecheked.gif" alt="{ checkall }" border="0"></a><a href="javascript:onCheckAll('groups', false)"><img src="{ babSkinPath }images/Puces/PuceUncheked.gif" alt="{ uncheckall }" border="0"></a></td>
		</tr>
		</table>
	</td>
</tr>
</table>
<br />
<div align="center">
<input type="submit" name="submit" value="{ t_update }" /></div>
<br />
</form>
<!--#end glist -->